/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

import org.junit.Before;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;

/**
 * 
 * @author gartner
 */
public class ItemGroupTest {
	private Item item;
	private ItemGroup group;

	public ItemGroupTest() {
	}

	@Before
	public void setUp() throws Exception {
		item = new Item();

		item.setPrice(200);
		group = new ItemGroup();
	}

	@AfterClass
	public static void tearDownClass() throws Exception {
	}

	/**
	 * Test of hasItem method, of class ItemGroup.
	 */
	@Test
	public void testHasItem() {
		assertFalse(group.hasItem(item));
		group.addItem(item);
		assertTrue(group.hasItem(item));
		group.removeItem(item);
		assertFalse(group.hasItem(item));
	}

}
